function getHTTPObject() 
{
	var xmlhttp; 
  	if(window.XMLHttpRequest)
  	{
    	xmlhttp = new XMLHttpRequest();
  	}
  	else if (window.ActiveXObject)
  	{
    	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	if (!xmlhttp)
		{
        	xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    	}   
	}
  	return xmlhttp;
}

function showglrs()
{
	var httpQuote = getHTTPObject();
	var num_glrs=window.document.getElementById('num_glrs').value;
	var url = "edit_dynamic.php";
	var param = "num_glrs="+num_glrs;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('show_glrs').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function showglsr()
{
	var httpQuote = getHTTPObject();
	var num_glsr=window.document.getElementById('num_glsr').value;
	var url = "edit_dynamic.php";
	var param = "num_glsr="+num_glsr;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('show_glsr').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function showpsp()
{
	var httpQuote = getHTTPObject();
	var psp_total=window.document.getElementById('psp_total').value;
	var url = "edit_dynamic.php";
	var param = "psp_total="+psp_total;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('show_psp').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function source_dtls1(formId)
{
	var httpQuote = getHTTPObject();
	var num_source=window.document.getElementById('num_source').value;
	var url = "edit_q1_source_detail.php";
	//var param = "num_source="+num_source;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('source_dtls').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function show_subm1(formId)
{
	var httpQuote = getHTTPObject();
	var sub_total=window.document.getElementById('sub_total').value;
	//alert(cwr_total);
	var url = "edit_q1_sub.php";
	var param = "form_id="+formId;
	//var param = "sub_total="+sub_total;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('subm').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function show_mono1(formId)
{
	var httpQuote = getHTTPObject();
	var mono_total=window.document.getElementById('mono_total').value;
	//alert(cwr_total);
	var url = "edit_q1_mono.php";
	//var param = "mono_total="+mono_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('mono').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function show_centi1(formId)
{
	var httpQuote = getHTTPObject();
	var centi_total=window.document.getElementById('centi_total').value;
	//alert(cwr_total);
	var url = "edit_q1_centi.php";
	//var param = "centi_total="+centi_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('centi').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function show_sp1(formId)
{
	var httpQuote = getHTTPObject();
	var sp_total=window.document.getElementById('sp_total').value;
	//alert(cwr_total);
	var url = "edit_q1_sp.php";
	//var param = "sp_total="+sp_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('sp').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}

function show_cwr_cap1(formId)
{
	var httpQuote = getHTTPObject();
	var cwr_total=window.document.getElementById('cwr_total').value;
	//alert(cwr_total);
	var url = "edit_q1_cwr.php";
	//var param = "cwr_total="+cwr_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('cwr_cap').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}
function show_glsr_cap1(formId)
{
	var httpQuote = getHTTPObject();
	var glsr_total=window.document.getElementById('glsr_total').value;
	var url = "edit_q1_glsr.php";
	//var param = "glsr_total="+glsr_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('glsr_cap').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}
function show_glr_cap1(formId)
{
	var httpQuote = getHTTPObject();
	var glr_total=window.document.getElementById('glr_total').value;
	var url = "edit_q1_glr.php";
	//var param = "glr_total="+glr_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('glr_cap').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}
function show_ohsr_cap1(formId)
{
	var httpQuote = getHTTPObject();
	var ohsr_total=window.document.getElementById('ohsr_total').value;
	var url = "edit_q1_ohsr.php";
	//var param = "ohsr_total="+ohsr_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('ohsr_cap').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}
function showpsp1_q1(formId)
{
	var httpQuote = getHTTPObject();
	var psp_total=window.document.getElementById('psp_total').value;
	var url = "edit_q1_psp.php";
	//var param = "psp_total="+psp_total;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(url);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('show_psp_q1').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}
/*function show_tanker1(i,formId)
{
	var httpQuote = getHTTPObject();
	var water_supply_no=window.document.getElementById('water_supply_no'+i).value;
	var url = "edit_q1_tanker.php";
	//var param = "water_supply_no="+water_supply_no;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('tanker'+i).innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}*/

function showhabit1(formId)
{
	var httpQuote = getHTTPObject();
	var num_unhabit=window.document.getElementById('num_unhabit').value;
	var url = "edit_q1_unhabit.php";
	//var param = "num_unhabit="+num_unhabit;
	var param = "form_id="+formId;
   	httpQuote.open("POST",url,true);
	//alert(param);
	//alert(httpQuote.onreadystatechange);
	httpQuote.onreadystatechange = function() {
	//alert(httpQuote.readyState);
	if(httpQuote.readyState==4)
	{
	    if (httpQuote.status==200 )
		{
			//alert(httpQuote.responseText);
			document.getElementById('show_unhabit').innerHTML=httpQuote.responseText;
			//confirm("Do you want to save!");
		}
		else
		{
			alert("An error has occured making the request");
		}
	}
	}
	httpQuote.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	httpQuote.send(param);	
}






